package com.xbfinal.eduservice.controller;


import com.xbfinal.commonUtils.Result;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import java.util.HashMap;
import java.util.Map;

/**
 * @Title: EduLoginController
 * @Author 笑霸fianl
 * @Package com.xbfinal.eduservice.controller
 * @Date 2022/12/28 20:01
 * @描述: 登录和推出功能
 */
@RestController
@Api(value = "登录管理")
@RequestMapping("/eduService/user")
public class EduLoginController {



    @ApiOperation("登录功能")
    @PostMapping("login")
    public Result login(){

        Map<String, String> map = new HashMap();
        map.put("token","admin");
        return Result.ok().addData(map);
    }


    @ApiOperation("详细")
    @GetMapping("getInfo")
    public Result info(){

        Map<String, String> map = new HashMap();
        map.put("token","111");
        map.put("name","admin");
        map.put("avatar","https://ts1.cn.mm.bing.net/th?id=OIP-C.pwe6d0WIGGDJli8WhKduPAAAAA&w=176&h=185&c=8&rs=1&qlt=90&o=6&dpr=1.3&pid=3.1&rm=2");
        return Result.ok().addData(map);
    }

    @ApiOperation("退出")
    @PostMapping("logout")
    public Result logout(){

       return Result.ok();
    }
}
